<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@  taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>onlineMsg - 编辑信息</title>
    <link rel="stylesheet" href="statics/plugs/layui/css/layui.css">
    <link rel="stylesheet" href="statics/plugs/font-awesome-4.7.0/css/font-awesome.css">
    <link rel="stylesheet" href="statics/css/style.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--引入头部文件  -->
    <jsp:include page="top.jsp"/>

   	<!-- 引入左侧导航 -->
 	<jsp:include page="left.jsp"/>
 	
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">

            <div class="layui-col-md6 layui-col-sm8 layui-col-xs12 layui-col-md-offset2 layui-col-sm-offset2">


            <form class="layui-form layui-form-pane" action="sendMsg" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">主题</label>
                    <div class="layui-input-block">
                        <input value="<c:if test="${not empty param.title}">回复:${param.title}</c:if>" type="text" name="title" required  lay-verify="required" placeholder="请输入主题" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">选择收信人</label>
                    <div class="layui-input-block">
                        <select name="sendto" lay-verify="required">
                            <option value=""></option>
                            <c:forEach  items="${toUsers}"  var="u">
                            	<option <c:if test="${param.username==u.username}">selected</c:if>>${u.username}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文本域</label>
                    <div class="layui-input-block">
                        <textarea name="msgcontent"  id="ct" placeholder="请输入内容" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block" >
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        
                        <c:if test="${sendRs=='success'}"><span  style="color: green">发送成功</span></c:if>
                        <c:if test="${sendRs=='error'}"><span  style="color: green">发送失败</span></c:if>
                        <c:remove var="sendRs" scope="session" />
                    </div>
                </div>
            </form>

            </div>

        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        ©2019-2099 Mr.king - 版权所有
    </div>
</div>
<script src="statics/plugs/layui/layui.js"></script>
<script src="statics/js/style.js"></script>
</body>
</html>